import request from '@/utils/request'

// 查询商品信息列表
export function goodsList(query) {
  return request({
    url: '/sale/goods/list',
    method: 'get',
    params: query
  })
}

// 采购商品信息列表
export function goodsProcureList(query) {
  return request({
    url: '/sale/goodsProcure/list',
    method: 'get',
    params: query
  })
}

// 商品模板列表
export function goodsMouldList(query) {
  return request({
    url: '/sale/goodsMould/list',
    method: 'get',
    params: query
  })
}

// 商品库存列表
export function goodsStockList(query) {
  return request({
    url: '/sale/goodsStock/list',
    method: 'get',
    params: query
  })
}

// 商品分类列表
export function goodsClassList(query) {
  return request({
    url: '/sale/goodsClass/list',
    method: 'get',
    params: query
  })
}

// 供应商列表
export function goodsSupplierList(query) {
  return request({
    url: '/sale/goodsSupplier/list',
    method: 'get',
    params: query
  })
}

// 新增商品
export function goodsAdd(data) {
  return request({
    url: '/sale/goods/add',
    method: 'post',
    data
  })
}

// 新增采购商品
export function goodsProcureAdd(data) {
  return request({
    url: '/sale/goodsProcure/add',
    method: 'post',
    data
  })
}

// 新增库存商品
export function goodsStockAdd(data) {
  return request({
    url: '/sale/goodsStock/add',
    method: 'post',
    data
  })
}

// 新增商品模板
export function goodsMouldAdd(data) {
  return request({
    url: '/sale/goodsMould/add',
    method: 'post',
    data
  })
}

// 新增商品分类
export function goodsClassAdd(data) {
  return request({
    url: '/sale/goodsClass/add',
    method: 'post',
    data
  })
}

// 新增商品供应商
export function goodsSupplier(data) {
  return request({
    url: '/sale/goodsSupplier/add',
    method: 'post',
    data
  })
}

// 编辑商品供应商
export function goodsSupplierEdit(data) {
  return request({
    url: '/sale/goodsSupplier/edit',
    method: 'post',
    data
  })
}


// 编辑商品分类
export function goodsClassEdit(data) {
  return request({
    url: '/sale/goodsClass/edit',
    method: 'post',
    data
  })
}

// 编辑商品
export function goodsEdit(data) {
  return request({
    url: '/sale/goods/edit',
    method: 'post',
    data
  })
}

// 采购撤销
export function goodsProcureEdit(data) {
  return request({
    url: '/sale/goodsProcure/edit',
    method: 'post',
    data
  })
}

// 模板删除
export function goodsProcureDelete(data) {
  return request({
    url: '/sale/goodsMould/delete',
    method: 'post',
    data
  })
}







